<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:46:"F:\chat/application/push\view\login\login.html";i:1572421617;}*/ ?>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <META HTTP-EQUIV="pragma" content="no-cache">
    <META HTTP-EQUIV="Cache-Control" content="no-store, must-revalidate">
    <META HTTP-EQUIV="expires" content="0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>登录</title>

    <link href="https://libs.cdnjs.net/twitter-bootstrap/4.3.1/css/bootstrap.css" rel="stylesheet">
    <link href="/public/chat/css/main.css" rel="stylesheet">

    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://libs.cdnjs.net/twitter-bootstrap/4.3.1/js/bootstrap.js"></script>
    <script type="text/javascript" src="/public/vendor/layer/layer.js"></script>
    <script type="text/javascript" src="/public/chat/js/main.js"></script>

</head>

<body>

    <div class="login">
        <div class="container">
            <div class="logo">
                <a href="####" target="_blank" class="header-logo"><img src="/public/chat/img/header-logo.png" alt=""></a>
            </div>
            <div class="row ">
                <div class="col-xs-12 col-sm-6 left">
                    <img src="/public/chat/img/signBg.png" alt="">
                </div>
                <div class="col-xs-12 col-sm-6 right">
                    <div class="cat">
                        <ul>
                            <li><a href="###" class="active">登录</a></li>
                            <li><a href="###">注册</a></li>
                            <div class="triangle-up"></div>
                        </ul>
                    </div>
                    <form id="formdata">
                        <input type="text" name="account" id="" placeholder="用户名">
                        <input type="password" name="password" id="" placeholder="密码">
                        <input type="button" value="登录" class="submit" onclick="login()">
                        <div class="clearfix">
                            <a class="" href="###">找回密码</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="footer">
        Copyright 2019 京ICP备15042119号-1</span>
    </div>

    <script>
        function login() {
            var data = $('#formdata').serializeArray();
            $.post("<?php echo url('login/login'); ?>", data, function(res) {
                console.log(res);
                layer.msg(res.msg);
                if (res.code == 1 && res.url) {
                    setTimeout(function() {
                        window.location.href = res.url
                    }, 1000)
                }

            })
        }
    </script>

</body>





</html>